package com.isoft.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 航班航线信息表-存储航线经停信息
 * @TableName FLIGHT_ROUTE
 */
@TableName(value ="FLIGHT_ROUTE")
@Data
public class FlightRoute implements Serializable {
    /**
     *
     */
    @TableId(type = IdType.AUTO)
    private Long ROUTE_ID;

    /**
     *
     */
    private Long FLIGHT_ID;

    /**
     * 航站序号(1-99表示经停顺序)
     */
    private Integer APNO;

    /**
     * 航站三字码(如PEK)
     */
    private String APCD;

    /**
     * 计划起飞时间
     */
    private Date FPTT;

    /**
     * 预计起飞时间
     */
    private Date FETT;

    /**
     * 实际起飞时间
     */
    private Date FRTT;

    /**
     * 计划降落时间
     */
    private Date FPLT;

    /**
     * 预计降落时间
     */
    private Date FELT;

    /**
     * 实际降落时间
     */
    private Date FRLT;

    /**
     * 航站属性:2401=国际/2402=地区/2403=国内/2404=混合
     */
    private String APAT;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        FlightRoute other = (FlightRoute) that;
        return (this.getROUTE_ID() == null ? other.getROUTE_ID() == null : this.getROUTE_ID().equals(other.getROUTE_ID()))
                && (this.getFLIGHT_ID() == null ? other.getFLIGHT_ID() == null : this.getFLIGHT_ID().equals(other.getFLIGHT_ID()))
                && (this.getAPNO() == null ? other.getAPNO() == null : this.getAPNO().equals(other.getAPNO()))
                && (this.getAPCD() == null ? other.getAPCD() == null : this.getAPCD().equals(other.getAPCD()))
                && (this.getFPTT() == null ? other.getFPTT() == null : this.getFPTT().equals(other.getFPTT()))
                && (this.getFETT() == null ? other.getFETT() == null : this.getFETT().equals(other.getFETT()))
                && (this.getFRTT() == null ? other.getFRTT() == null : this.getFRTT().equals(other.getFRTT()))
                && (this.getFPLT() == null ? other.getFPLT() == null : this.getFPLT().equals(other.getFPLT()))
                && (this.getFELT() == null ? other.getFELT() == null : this.getFELT().equals(other.getFELT()))
                && (this.getFRLT() == null ? other.getFRLT() == null : this.getFRLT().equals(other.getFRLT()))
                && (this.getAPAT() == null ? other.getAPAT() == null : this.getAPAT().equals(other.getAPAT()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getROUTE_ID() == null) ? 0 : getROUTE_ID().hashCode());
        result = prime * result + ((getFLIGHT_ID() == null) ? 0 : getFLIGHT_ID().hashCode());
        result = prime * result + ((getAPNO() == null) ? 0 : getAPNO().hashCode());
        result = prime * result + ((getAPCD() == null) ? 0 : getAPCD().hashCode());
        result = prime * result + ((getFPTT() == null) ? 0 : getFPTT().hashCode());
        result = prime * result + ((getFETT() == null) ? 0 : getFETT().hashCode());
        result = prime * result + ((getFRTT() == null) ? 0 : getFRTT().hashCode());
        result = prime * result + ((getFPLT() == null) ? 0 : getFPLT().hashCode());
        result = prime * result + ((getFELT() == null) ? 0 : getFELT().hashCode());
        result = prime * result + ((getFRLT() == null) ? 0 : getFRLT().hashCode());
        result = prime * result + ((getAPAT() == null) ? 0 : getAPAT().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", ROUTE_ID=").append(ROUTE_ID);
        sb.append(", FLIGHT_ID=").append(FLIGHT_ID);
        sb.append(", APNO=").append(APNO);
        sb.append(", APCD=").append(APCD);
        sb.append(", FPTT=").append(FPTT);
        sb.append(", FETT=").append(FETT);
        sb.append(", FRTT=").append(FRTT);
        sb.append(", FPLT=").append(FPLT);
        sb.append(", FELT=").append(FELT);
        sb.append(", FRLT=").append(FRLT);
        sb.append(", APAT=").append(APAT);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}